home *** CD-ROM | disk | FTP | other *** search
- The man most directly responsible for this twaddle was Peter Falkesand, who
- did thus comment on Sorting routine. on the night of 03-Oct-97:
- -> Hi!
-
- -> Is there a smooth way to sort 20 variables???
-
- -> and not do like this..
-
- -> --------------------------------
-
- -> If score1_1(1)>score2_1(1)
-
- -> Loke S7+40,Leek(S5+20)
-
- -> endif
-
- -> if score1_2(2)>score2_1(1)
-
- -> loke s7+60,leek(s5+40)
-
- -> endif
-
- -> -------------------------------
-
- Hmm, i have never *ever* tried to do it this way, it would be wayyy to big.
- Twinz used a high score table of 3 sets of 10 positions, and i'll go get the
- source and paste it into here...
-
- For N=1 To 10
- TP=TSCORE(N)
- If SCORE>TP : Rem or N=2
- For O=10 To N Step -1 : TSCORE(O)=TSCORE(O-1) :
- TSCORE$(O)=TSCORE$(O-1) : Next O
- TSCORE(N)=SCORE : TSCORE$(N)=TEX$
- End If
- Next N
-
- The routine finds the position of the highest point in the table it can go (if
- any) by running through all possible entries, and its higher value will be
- first, and N will be loaded with the current slightly-lower value.
-
- The second part of the routine, shuffles them all down by 1 position, from 1
- to
- 2, 2 to 3 etc. and inserts the value in SCORE in the correct space.
-
- Andrew "Mushroom" Kellett
- --
- Email: Andy Kellett <mushypd@redrose.net> Team *AMOS* + IAPA Team *AMIGA*
- alt.religion.amos - AMOS now on usenet! AMOS Mailinglist also mirrored
-
- World's Largest AMOS Homepages - http://www.mushy-pd.demon.co.uk
-
- Massive FTP site with AMOS/C64 and Mods/Samples + more at
- mushy-pd.dyn.ml.org
-
-
-